package org.to_zero.springboot.rabbitmq.config.service;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;
import org.to_zero.springboot.rabbitmq.config.entity.User;

@Service
public class UserService {
    @RabbitListener(queues = {"zero.news"})
    public void receive(User user) {
        System.out.println(user);
    }
}
